#include <stdio.h>
#include <math.h>
int main(int argc, char const *argv[])
{


// 	int base,power;
// 	scanf("%d%d",&base,&power);
// 	printf("result:%d\n",pow(base,power));

	for(int i=100;i<=999;i++)
	{
		int C=i%10;
		int B=(i-C)%100/10;
		int A=i/100;

#ifdef DEBUG
		printf("A:%d B:%d C:%d\n",A,B,C );
		printf("%d\n",i );
		printf("%s\n","--------------------");
#endif
		if(i==floor(pow(C,3)+pow(B,3)+pow(A,3)+0.5))
		{
			printf("%d\n",i);
		}
	}
	return 0;
}